"""
String 类型定义

@mcpy_headers: <string>
@mcpy_namespace: std
"""

from typing import TypeVar, Generic


# C++ std::string 类型
class string(str):
    """C++ std::string 类型"""

    def __init__(self, value: str = "") -> None:
        """构造函数"""
        pass

    def __add__(self, other: str) -> "string":
        """字符串连接"""
        ...

    def __len__(self) -> int:
        """获取长度"""
        ...

    def find(self, substr: str, pos: int = 0) -> int:
        """查找子字符串"""
        ...

    def substr(self, pos: int, count: int = -1) -> "string":
        """提取子字符串"""
        ...
